home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Commander Sets / 4D Violate / 4D Violate.rsrc / TEXT_288_ VI Set Volume.txt < prev    next >
Encoding:
Text File  |  1994-09-14  |  1.2 KB  |  31 lines

  1. VI¬†Set¬†Volume (volume)
  2.  
  3. volume      integer    defines the value to which the speaker volume must 
  4.                                      be set.
  5.  
  6.  
  7. Changes the current speaker volume setting to the value you specify. The speaker volume is always a value between 0 (silent) and 7 (loud).
  8.  
  9. This procedure changes the volume setting stored in the non-volatile PRAM memory, thus this setting will also be used after turning the computer off or after a restart. If you specify a value outside the 0 to 7 range, the nearest possible value will be used instead.
  10.  
  11. Keep in mind that the optimal volume setting can be different for different Macintosh models and locations. Volume level 5 is very loud on a Quadra 660AV with an AV monitor, but 7 is still to low for a Mac Plus... 
  12.  
  13. Also, with AV monitors the user can change the volume from the display with the built-in amplifier. So, again, let the user decide.
  14.  
  15.  
  16. Example:
  17.   C_INTEGER ($volume)
  18.  
  19.   $volume := VI Get Volume
  20.  
  21.   If ($volume <= 4)
  22.     CONFIRM ("The speaker volume is too low. Do you want to change it 
  23.                                    to the maximum possible?")
  24.     If (ok = 1)
  25.       VI Set Volume (7)
  26.     End If
  27.   End If
  28.   `but you can make your own slide bar‚Ķ
  29.  
  30.  
  31.